package sharing.model;

public class SharingPK {

	private long idSharing;
	
	private String idClient;
	
	public SharingPK() {}

	public String getIdClient() {
		return idClient;
	}

	public void setIdClient(String idClient) {
		this.idClient = idClient;
	}

	public long getIdSharing() {
		return idSharing;
	}

	public void setIdSharing(long idSharing) {
		this.idSharing = idSharing;
	}
	
	@Override
	public int hashCode() {
		return (int) ( idSharing ^ idClient.hashCode());
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null)
			return false;
		if (obj == this)
			return true;
		if (!(obj instanceof SharingPK))
			return false;
		SharingPK pk = (SharingPK) obj;
		return (pk.getIdSharing() == idSharing && pk.getIdClient().equals(idClient));
	}
}